package com.topcoder.service.studio.contest;

import java.io.Serializable;
import java.util.Date;

/**
 * Represents the ContestMultiRoundInformation entity. It holds the attributes
 * contest multi round information id,milestone date,submitters locked between
 * rounds,round one introduction,etc. It's mutable and not thread safe.
 * 
 * @author xp
 * 
 */
public class ContestMultiRoundInformation implements Serializable {
    /**
     * Generated serial version id.
     */
    private static final long serialVersionUID = -7772292480005209277L;

    /**
     * Represents the contest multi round information id attribute of the
     * ContestMultiRoundInformation entity. It's set and accessed in the set/get
     * methods. It can be any value. The default value is null
     */
    private Long contestMultiRoundInformationId;

    /**
     * Represents the milestone date attribute of the
     * ContestMultiRoundInformation entity. It's set and accessed in the set/get
     * methods. It can be any value. The default value is null.
     */
    private Date milestoneDate;

    /**
     * Represents the submitters locked between rounds attribute of the
     * ContestMultiRoundInformation entity. It's accessed in the corresponding
     * set/is method. The default value is null.
     */
    private boolean submittersLockedBetweenRounds;

    /**
     * Represents the round one introduction attribute of the
     * ContestMultiRoundInformation entity. It's set and accessed in the set/get
     * methods.It can be any value. The default value is null.
     */
    private String roundOneIntroduction;

    /**
     * Represents the round two introduction attribute of the
     * ContestMultiRoundInformation entity. It's set and accessed in the set/get
     * methods. It can be any value. The default value is null.
     */
    private String roundTwoIntroduction;

    /**
     * Default constructor.
     */
    public ContestMultiRoundInformation() {
    }

    /**
     * Returns the contestMultiRoundInformationId.
     * 
     * @return the contestMultiRoundInformationId.
     */
    public Long getContestMultiRoundInformationId() {
        return contestMultiRoundInformationId;
    }

    /**
     * Updates the contestSpecificationsId with the specified value.
     * 
     * @param contestMultiRoundInformationId
     *            the contestMultiRoundInformationId to set.
     */
    public void setContestMultiRoundInformationId(
            Long contestMultiRoundInformationId) {
        this.contestMultiRoundInformationId = contestMultiRoundInformationId;
    }

    /**
     * Returns the milestoneDate.
     * 
     * @return the milestoneDate.
     */
    public Date getMilestoneDate() {
        return milestoneDate;
    }

    /**
     * Updates the milestoneDate with the specified value.
     * 
     * @param milestoneDate
     *            the milestoneDate to set.
     */
    public void setMilestoneDate(Date milestoneDate) {
        this.milestoneDate = milestoneDate;
    }

    /**
     * Returns the submittersLockedBetweenRounds.
     * 
     * @return the submittersLockedBetweenRounds.
     */
    public boolean isSubmittersLockedBetweenRounds() {
        return submittersLockedBetweenRounds;
    }

    /**
     * Updates the submittersLockedBetweenRounds with the specified value.
     * 
     * @param submittersLockedBetweenRounds
     *            the submittersLockedBetweenRounds to set.
     */
    public void setSubmittersLockedBetweenRounds(
            boolean submittersLockedBetweenRounds) {
        this.submittersLockedBetweenRounds = submittersLockedBetweenRounds;
    }

    /**
     * Returns the roundOneIntroduction.
     * 
     * @return the roundOneIntroduction.
     */
    public String getRoundOneIntroduction() {
        return roundOneIntroduction;
    }

    /**
     * Updates the roundOneIntroduction with the specified value.
     * 
     * @param roundOneIntroduction
     *            the roundOneIntroduction to set.
     */
    public void setRoundOneIntroduction(String roundOneIntroduction) {
        this.roundOneIntroduction = roundOneIntroduction;
    }

    /**
     * Returns the roundTwoIntroduction.
     * 
     * @return the roundTwoIntroduction.
     */
    public String getRoundTwoIntroduction() {
        return roundTwoIntroduction;
    }

    /**
     * Updates the roundTwoIntroduction with the specified value.
     * 
     * @param roundTwoIntroduction
     *            the roundTwoIntroduction to set.
     */
    public void setRoundTwoIntroduction(String roundTwoIntroduction) {
        this.roundTwoIntroduction = roundTwoIntroduction;
    }

    /**
     * Compares this object with the passed object for equality. Only the id
     * will be compared.
     * 
     * @param obj
     *            the {@code Object} to compare to this one
     * @return true if this object is equal to the other, {@code false} if not
     */
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Contest) {
            return getContestMultiRoundInformationId() == ((ContestMultiRoundInformation) obj)
                    .getContestMultiRoundInformationId();
        }
        return false;
    }

    /**
     * Overrides {@code Object.hashCode()} to provide a hash code consistent
     * with this class's {@link #equals(Object)}} method.
     * 
     * @return a hash code for this {@code Contest}
     */
    @Override
    public int hashCode() {
        return Helper.calculateHash(contestMultiRoundInformationId);
    }
}
